//*******************************************************************
//  Books.java   Author: Tang Caiming
//
//  阅读材料，包含其基本属性。
//*******************************************************************
public class Books
{
    protected int pages;  //  书页数
    protected String bookname;  // 书名
    protected String author;  // 作者
    protected String press;  // 出版社
    protected String copyrightdate; // 日期

    public Books(int numpages, String numbookname,String numauthor,String numpress,String numcopyrightdate)
    {
        pages = numpages;
        bookname = numbookname;
        author = numauthor;
        press = numpress;
        copyrightdate = numcopyrightdate;
    }
    public void setPages(int numPages)
    {
        pages = numPages;
    }

    public int getPage()
    {
        return pages;
    }

    public void setAuthor(String author)
    {
        this.author = author;
    }

    public String getAuthor()
    {
        return author;
    }

    public void setBookname(String bookname)
    {
        this.bookname = bookname;
    }

    public String getBookname()
    {
        return bookname;
    }

    public void setPress(String press)
    {
        this.press = press;
    }

    public String getPress()
    {
        return press;
    }

    public void setCopyrightdate(String copyrightdate)
    {
        this.copyrightdate = copyrightdate;
    }

    public String getCopyrightdate()
    {
        return copyrightdate;
    }

    public String toString()
    {
        String result = "该书的总页数为：" + pages + "\n" +
                        "该书的名字为：" + bookname + "\n" +
                        "该书的作者为：" + author + "\n" +
                        "该书的出版社为：" + press + "\n" +
                        "该书的出版日期为：" + copyrightdate;
        return result;
    }

}
